"""
模拟一个醉汉在二维空间上的随机漫步。
"""
import matplotlib.pyplot as plt
import numpy as np
import random

steps = 1000
draws = np.random.randint(-1, 2, size=steps)
walk = draws.cumsum()
plt.plot(walk)
plt.show()
